"""bigrice URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

from django.contrib import admin
# bigrice/urls.py
from django.conf import settings
from django.conf.urls.static import static

import store
from cart.views import Cart, CartProfileForm


from django.urls import path, include
from rest_framework.routers import DefaultRouter

from order.views import order, Return, LogisticsView, Requestreturn, wuliu
from products.views import ProductViewSet, search, AddProductView, Detail,Comment,Kinds
from store.views import storehome, StoreManage
from users.views import UserRegistrationView, index, log_out, log_in, Home, personal

urlpatterns = [
    path('',index, name='index'),
    path('login/', log_in, name='user-login'),
    path('logout/', log_out, name='user-login'),
    path('register/', UserRegistrationView.as_view(), name='user-register'),
    path('home/', Home.as_view(), name='home'),
    path('add_product/', AddProductView.as_view(), name='user-cart-add-to-cart'),
    path('search/', search.as_view(), name='search'),
    path('personal/', personal.as_view(), name='personal_information'),
    path('storehome/',storehome.as_view(),name='store_home'),
    path('order/', order.as_view(), name='create_order'),
    path('detail/', Detail.as_view(), name='detail'),
    path('comment/', Comment.as_view(), name='comment'),
    path('cart/', Cart.as_view(), name='cart'),
    path('store/', StoreManage.as_view(), name='cart'),
    path('logistics/', LogisticsView.as_view(), name='logistics'),
    path('stream/', wuliu.as_view(), name='return'),
    path('requestreturn/', Requestreturn.as_view(), name='requestreturn'),
    path('message/', Kinds.as_view(), name='message'),
    path('return/',Return.as_view(), name='return'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)


